const app = {
    state: {
        asideIsCollapse: true,
        navTags: [],
    },

    mutations: {
        SetAsideIsCollapse: (state) => {
            state.asideIsCollapse = !state.asideIsCollapse
        },
        AddNavTags: (state, navTag) => {
            //判断没有的话添加
            if (!state.navTags.some(item => {
                if (item.name === navTag.name) {
                    return true
                }
            })) {
                state.navTags.push(navTag)
            }
        },
    },

    actions: {}
}

export {app}
